﻿using System.Drawing;

namespace ThresholdAssistant.QRCode.Codec.Data
{
    /// <summary>
    /// 
    /// </summary>
    public class QRCodeBitmapImage : QRCodeImage
    {
        /// <summary>
        /// 
        /// </summary>
        private Bitmap image;

        /// <summary>
        /// 
        /// </summary>
        /// <param name="image"></param>
        public QRCodeBitmapImage(Bitmap image)
        {
            this.image = image;
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="x"></param>
        /// <param name="y"></param>
        /// <returns></returns>
        public virtual int getPixel(int x, int y) => this.image.GetPixel(x, y).ToArgb();

        /// <summary>
        /// 
        /// </summary>
        public virtual int Width => this.image.Width;

        /// <summary>
        /// 
        /// </summary>
        public virtual int Height => this.image.Height;
    }
}